<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pin: Application Level Debugging API</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pin
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Application Level Debugging API<div class="ingroups"><a class="el" href="group__API__REF.html">Instrumentation API Reference</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDEBUGGER__REG__DESCRIPTION.html">DEBUGGER_REG_DESCRIPTION</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDEBUG__CONNECTION__INFO.html">DEBUG_CONNECTION_INFO</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDEBUG__MODE.html">DEBUG_MODE</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga3d6a74972d3450e7fb487103f5fe8147"><td class="memItemLeft" align="right" valign="top">typedef BOOL(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga3d6a74972d3450e7fb487103f5fe8147">DEBUG_INTERPRETER_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, const std::string &amp;cmd, std::string *reply, VOID *v)</td></tr>
<tr class="separator:ga3d6a74972d3450e7fb487103f5fe8147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaee4c44a7173aa62cd5121253d2966b52"><td class="memItemLeft" align="right" valign="top">typedef BOOL(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gaee4c44a7173aa62cd5121253d2966b52">DEBUG_BREAKPOINT_CALLBACK</a>) (ADDRINT addr, UINT size, BOOL insert, VOID *v)</td></tr>
<tr class="separator:gaee4c44a7173aa62cd5121253d2966b52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e5a10fa61485e7bce314a1c3fe51216"><td class="memItemLeft" align="right" valign="top">typedef BOOL(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga3e5a10fa61485e7bce314a1c3fe51216">INTERCEPT_DEBUGGING_EVENT_CALLBACK</a>) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="group__APPDEBUG.html#gad6ae164e2005bda040921f234730cb5a">DEBUGGING_EVENT</a> eventType, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *arg)</td></tr>
<tr class="separator:ga3e5a10fa61485e7bce314a1c3fe51216"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9d7745cc697db791f72d06cd149daa72"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga9d7745cc697db791f72d06cd149daa72">GET_EMULATED_REGISTER_CALLBACK</a>) (unsigned toolRegId, <a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *data, VOID *v)</td></tr>
<tr class="separator:ga9d7745cc697db791f72d06cd149daa72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb569f5ec458c0cdacfbc511e8d7a24b"><td class="memItemLeft" align="right" valign="top">typedef VOID(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gacb569f5ec458c0cdacfbc511e8d7a24b">SET_EMULATED_REGISTER_CALLBACK</a>) (unsigned toolRegId, <a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, const VOID *data, VOID *v)</td></tr>
<tr class="separator:gacb569f5ec458c0cdacfbc511e8d7a24b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5bdf55a090a9e22c7fdc2efbfac8cb6"><td class="memItemLeft" align="right" valign="top">typedef USIZE(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gaf5bdf55a090a9e22c7fdc2efbfac8cb6">GET_TARGET_DESCRIPTION_CALLBACK</a>) (const std::string &amp;name, USIZE size, VOID *buf, VOID *v)</td></tr>
<tr class="separator:gaf5bdf55a090a9e22c7fdc2efbfac8cb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gad6ae164e2005bda040921f234730cb5a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gad6ae164e2005bda040921f234730cb5a">DEBUGGING_EVENT</a> { <br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#ggad6ae164e2005bda040921f234730cb5aad5cc78dfe7674fb92a5fb4a7648d00d9">DEBUGGING_EVENT_BREAKPOINT</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#ggad6ae164e2005bda040921f234730cb5aa2b7b5b57923d2c0fd4dfee4a4a2e4b73">DEBUGGING_EVENT_SINGLE_STEP</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#ggad6ae164e2005bda040921f234730cb5aa5d342e07a5c1d8f4707af1c8d1835f5c">DEBUGGING_EVENT_ASYNC_BREAK</a>
<br />
 }</td></tr>
<tr class="separator:gad6ae164e2005bda040921f234730cb5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga41e814fff526e0232f2f8c3055d6e88b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga41e814fff526e0232f2f8c3055d6e88b">DEBUG_STATUS</a> { <br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga41e814fff526e0232f2f8c3055d6e88ba72ca0db67ae970e3c62a40b5ac4f7003">DEBUG_STATUS_DISABLED</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga41e814fff526e0232f2f8c3055d6e88ba8360ff1aaecfe81589ca624db3618367">DEBUG_STATUS_UNCONNECTABLE</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga41e814fff526e0232f2f8c3055d6e88ba994b4c3ad3ae17936ecf71deaadf1f80">DEBUG_STATUS_UNCONNECTED</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga41e814fff526e0232f2f8c3055d6e88bac55ed4b18e05f4dcd13a38bbe6ee6cb7">DEBUG_STATUS_CONNECTED</a>
<br />
 }</td></tr>
<tr class="separator:ga41e814fff526e0232f2f8c3055d6e88b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga25f41d731fbc522fea67abd02f9c04c6"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga25f41d731fbc522fea67abd02f9c04c6">DEBUG_CONNECTION_TYPE</a> { <br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga25f41d731fbc522fea67abd02f9c04c6a48023b1450d43ba2c4190432e50fcb44">DEBUG_CONNECTION_TYPE_NONE</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga25f41d731fbc522fea67abd02f9c04c6abc9902ef5ebfac00333f6ce7bd00cd57">DEBUG_CONNECTION_TYPE_TCP_SERVER</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga25f41d731fbc522fea67abd02f9c04c6a656476b26189f8de3f70603ce19a3640">DEBUG_CONNECTION_TYPE_TCP_CLIENT</a>
<br />
 }</td></tr>
<tr class="separator:ga25f41d731fbc522fea67abd02f9c04c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87ad53f06ecf9cbcd3b94a155e1c11b5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga87ad53f06ecf9cbcd3b94a155e1c11b5">DEBUGGER_TYPE</a> { <br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga87ad53f06ecf9cbcd3b94a155e1c11b5a36c70d872b32db70ffa16fb1f9a1e698">DEBUGGER_TYPE_UNKNOWN</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga87ad53f06ecf9cbcd3b94a155e1c11b5a93747991bbf93bec18a63aa0def7502a">DEBUGGER_TYPE_GDB</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga87ad53f06ecf9cbcd3b94a155e1c11b5ae257dd6ee7c4c21be32afc5dfa4145ee">DEBUGGER_TYPE_LLDB</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga87ad53f06ecf9cbcd3b94a155e1c11b5a215d036d52fcd8a1d9d0655c0915983f">DEBUGGER_TYPE_IDB</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga87ad53f06ecf9cbcd3b94a155e1c11b5a382d02f0500b212562d3278dee138b3c">DEBUGGER_TYPE_VISUAL_STUDIO_VSDBG</a>, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#gga87ad53f06ecf9cbcd3b94a155e1c11b5aa51709dd57db7e6200b154e9b1cb71d7">DEBUGGER_TYPE_VISUAL_STUDIO</a>
<br />
 }</td></tr>
<tr class="separator:ga87ad53f06ecf9cbcd3b94a155e1c11b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8cf023622aae11218cc9c911b906deb"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gaf8cf023622aae11218cc9c911b906deb">DEBUG_MODE_OPTION</a> { <br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#ggaf8cf023622aae11218cc9c911b906deba83aab8069eb6913be66d65a272343f4f">DEBUG_MODE_OPTION_NONE</a> = 0, 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#ggaf8cf023622aae11218cc9c911b906debad239403d750fcc2bd58f07d609c9962a">DEBUG_MODE_OPTION_STOP_AT_ENTRY</a> = (1 &lt;&lt; 0), 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#ggaf8cf023622aae11218cc9c911b906deba723c132474f30b96833655fba66a3cf5">DEBUG_MODE_OPTION_SILENT</a> = (1 &lt;&lt; 1), 
<br />
&#160;&#160;<a class="el" href="group__APPDEBUG.html#ggaf8cf023622aae11218cc9c911b906deba4e65fd1fd0aadcefd334b4824965eaf7">DEBUG_MODE_OPTION_ALLOW_REMOTE</a> = (1 &lt;&lt; 2)
<br />
 }</td></tr>
<tr class="separator:gaf8cf023622aae11218cc9c911b906deb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4f727b422499f5d312204ba42b23fda0"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga4f727b422499f5d312204ba42b23fda0">PIN_InterceptDebuggingEvent</a> (<a class="el" href="group__APPDEBUG.html#gad6ae164e2005bda040921f234730cb5a">DEBUGGING_EVENT</a> eventType, <a class="el" href="group__APPDEBUG.html#ga3e5a10fa61485e7bce314a1c3fe51216">INTERCEPT_DEBUGGING_EVENT_CALLBACK</a> fun, VOID *arg)</td></tr>
<tr class="separator:ga4f727b422499f5d312204ba42b23fda0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga227aa5052c499e58c77a376048478647"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga227aa5052c499e58c77a376048478647">PIN_AddDebuggerRegisterEmulator</a> (unsigned numRegisters, const <a class="el" href="structDEBUGGER__REG__DESCRIPTION.html">DEBUGGER_REG_DESCRIPTION</a> *registerDescriptions, <a class="el" href="group__APPDEBUG.html#ga9d7745cc697db791f72d06cd149daa72">GET_EMULATED_REGISTER_CALLBACK</a> getFun, <a class="el" href="group__APPDEBUG.html#gacb569f5ec458c0cdacfbc511e8d7a24b">SET_EMULATED_REGISTER_CALLBACK</a> setFun, <a class="el" href="group__APPDEBUG.html#gaf5bdf55a090a9e22c7fdc2efbfac8cb6">GET_TARGET_DESCRIPTION_CALLBACK</a> getDescriptionFun, VOID *val)</td></tr>
<tr class="separator:ga227aa5052c499e58c77a376048478647"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b7429dba7db028dc095a48d026b30f3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga8b7429dba7db028dc095a48d026b30f3">PIN_AddDebugInterpreter</a> (<a class="el" href="group__APPDEBUG.html#ga3d6a74972d3450e7fb487103f5fe8147">DEBUG_INTERPRETER_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga8b7429dba7db028dc095a48d026b30f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae16ccb04f07c4d2d7eb021e128b28f2b"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gae16ccb04f07c4d2d7eb021e128b28f2b">PIN_RemoveDebugInterpreter</a> (<a class="el" href="group__APPDEBUG.html#ga3d6a74972d3450e7fb487103f5fe8147">DEBUG_INTERPRETER_CALLBACK</a> fun)</td></tr>
<tr class="separator:gae16ccb04f07c4d2d7eb021e128b28f2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d6cb680fcf43fe32857fe54bfc8e2a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga4d6cb680fcf43fe32857fe54bfc8e2a3">PIN_AddBreakpointHandler</a> (<a class="el" href="group__APPDEBUG.html#gaee4c44a7173aa62cd5121253d2966b52">DEBUG_BREAKPOINT_CALLBACK</a> fun, VOID *val)</td></tr>
<tr class="separator:ga4d6cb680fcf43fe32857fe54bfc8e2a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca4da902f7ed6a9985b9ab26a6699384"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gaca4da902f7ed6a9985b9ab26a6699384">PIN_RemoveBreakpointHandler</a> (<a class="el" href="group__APPDEBUG.html#gaee4c44a7173aa62cd5121253d2966b52">DEBUG_BREAKPOINT_CALLBACK</a> fun)</td></tr>
<tr class="separator:gaca4da902f7ed6a9985b9ab26a6699384"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa878efff68323d2a8f23b7ee2b5a912c"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gaa878efff68323d2a8f23b7ee2b5a912c">PIN_ResetBreakpointAt</a> (ADDRINT addr)</td></tr>
<tr class="separator:gaa878efff68323d2a8f23b7ee2b5a912c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabbd52cd5977cd9ffef8065f144137b14"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint</a> (const <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, <a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, BOOL waitIfNoDebugger, const std::string &amp;msg)</td></tr>
<tr class="separator:gabbd52cd5977cd9ffef8065f144137b14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga15e52a111880529d439946eb392dd992"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga15e52a111880529d439946eb392dd992">PIN_SetDebugMode</a> (const <a class="el" href="structDEBUG__MODE.html">DEBUG_MODE</a> *mode)</td></tr>
<tr class="separator:ga15e52a111880529d439946eb392dd992"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga92c6d18526f1f895eb9d2736c79478e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__APPDEBUG.html#ga41e814fff526e0232f2f8c3055d6e88b">DEBUG_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga92c6d18526f1f895eb9d2736c79478e4">PIN_GetDebugStatus</a> ()</td></tr>
<tr class="separator:ga92c6d18526f1f895eb9d2736c79478e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36087c681ff5cdf730c3d5d12723ba4b"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga36087c681ff5cdf730c3d5d12723ba4b">PIN_GetDebugConnectionInfo</a> (<a class="el" href="structDEBUG__CONNECTION__INFO.html">DEBUG_CONNECTION_INFO</a> *info)</td></tr>
<tr class="separator:ga36087c681ff5cdf730c3d5d12723ba4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbe2a0980528561c214a4b8bfdca1251"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__APPDEBUG.html#ga87ad53f06ecf9cbcd3b94a155e1c11b5">DEBUGGER_TYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gadbe2a0980528561c214a4b8bfdca1251">PIN_GetDebuggerType</a> ()</td></tr>
<tr class="separator:gadbe2a0980528561c214a4b8bfdca1251"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc153fff2b3f0f8542b5c5208356f0fb"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gacc153fff2b3f0f8542b5c5208356f0fb">PIN_WaitForDebuggerToConnect</a> (unsigned timeout)</td></tr>
<tr class="separator:gacc153fff2b3f0f8542b5c5208356f0fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c5930cc3e21cec532e4909ee3f9f165"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga9c5930cc3e21cec532e4909ee3f9f165">PIN_GetStoppedThreadPendingToolBreakpoint</a> (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, std::string *msg)</td></tr>
<tr class="separator:ga9c5930cc3e21cec532e4909ee3f9f165"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab651618eb1f148e0f1d0af927510c3a6"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#gab651618eb1f148e0f1d0af927510c3a6">PIN_ChangePendingToolBreakpointOnStoppedThread</a> (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, BOOL squash, const std::string &amp;msg)</td></tr>
<tr class="separator:gab651618eb1f148e0f1d0af927510c3a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0d438691aafd8e03aadbd6b60049dae9"><td class="memItemLeft" align="right" valign="top">VOID *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga0d438691aafd8e03aadbd6b60049dae9">IMG_GetLoaderInfo</a> (IMG img)</td></tr>
<tr class="separator:ga0d438691aafd8e03aadbd6b60049dae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73ff2524249eac7fa68f269b642a7dac"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__APPDEBUG.html#ga73ff2524249eac7fa68f269b642a7dac">IMG_SetLoaderInfo</a> (IMG img, VOID *loaderInfo)</td></tr>
<tr class="separator:ga73ff2524249eac7fa68f269b642a7dac"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This API allows the user to debug the application that is running on top of Pin. It also allows a tool to interact with the debugger and provide extended commands to the debugger. Also see the tutorial section on this topic: <a class="el" href="index.html#APPDEBUG">The Pin Advanced Debugging Extensions</a>. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="gaee4c44a7173aa62cd5121253d2966b52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaee4c44a7173aa62cd5121253d2966b52">&#9670;&nbsp;</a></span>DEBUG_BREAKPOINT_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef BOOL(* DEBUG_BREAKPOINT_CALLBACK) (ADDRINT addr, UINT size, BOOL insert, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function to handle breakpoint set requests from a debugger.</p>
<p>Once a callback accepted control over a breakpoint at the given address, Pin and PinADX will not stop at that address. The stop responsibility is handled solely by the tool.</p>
<p>However, PinADX does keep track of the breakpoint, in case the tool wants to "reset" the breakpoint and give the control back to PinADX.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>The address of the requested breakpoint. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the breakpoint (HW/SW) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">insert</td><td>Whether if this is a breakpoint insertion or deletion. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if this callback function takes control over the breakpoint. FALSE if it does not. If FALSE is returned, Pin will call the next registered interpreter to see if it understands <em>cmd</em>. </dd></dl>

</div>
</div>
<a id="ga3d6a74972d3450e7fb487103f5fe8147"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d6a74972d3450e7fb487103f5fe8147">&#9670;&nbsp;</a></span>DEBUG_INTERPRETER_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef BOOL(* DEBUG_INTERPRETER_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> threadIndex, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, const std::string &amp;cmd, std::string *reply, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Pin client functions for the application-level debugger.</p>
<p>Call-back function to handle commands from a debugger.</p>
<p>The format of the <em>cmd</em> and <em>reply</em> strings may vary depending on which debugger is connected to Pin. Tools can call <a class="el" href="group__APPDEBUG.html#gadbe2a0980528561c214a4b8bfdca1251">PIN_GetDebuggerType()</a> to tell which debugger is connected.</p>
<p>When the debugger is GDB, <em>cmd</em> is the text string that the user types after the "monitor" command and <em>reply</em> is displayed verbatim as a response to the command.</p>
<p>Pin reserves all command strings that start with the prefix "pin " or "pin:". Pin interprets these commands itself and does not pass them on to the tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threadIndex</td><td>The Pin thread ID of the debugger's "focus" thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Application register state of the debugger's "focus" thread. The interpreter can change this state if it handles <em>cmd</em>. When the debugger resumes this thread, it will use the new register state in <em>ctxt</em>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cmd</td><td>The debugger command. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">reply</td><td>Receives the reply to the command, if the interpreter understands <em>cmd</em>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if this interpreter function understands <em>cmd</em>. FALSE if it does not. If FALSE is returned, Pin will call the next registered interpreter to see if it understands <em>cmd</em>. </dd></dl>

</div>
</div>
<a id="ga9d7745cc697db791f72d06cd149daa72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9d7745cc697db791f72d06cd149daa72">&#9670;&nbsp;</a></span>GET_EMULATED_REGISTER_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* GET_EMULATED_REGISTER_CALLBACK) (unsigned toolRegId, <a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *data, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function that Pin calls to get the value of a register emulated by the tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">toolRegId</td><td>Identifies the emulated register (from the <em>registerDescriptions</em> parameter to <a class="el" href="group__APPDEBUG.html#ga227aa5052c499e58c77a376048478647">PIN_AddDebuggerRegisterEmulator()</a>). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>Identifies the thread whose register is read. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Architected register state for the thread. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>Points to a buffer that receives the value of the register. The value must be stored in little-endian format (least significant bytes first). If the register size is not an even multiple of bytes, the upper bits of the last byte (most significant byte) are unused. If the register size is 2, 4, or 8 bytes, <em>data</em> is naturally aligned, so it may be cast to a pointer of the appropriate type. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf5bdf55a090a9e22c7fdc2efbfac8cb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf5bdf55a090a9e22c7fdc2efbfac8cb6">&#9670;&nbsp;</a></span>GET_TARGET_DESCRIPTION_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef USIZE(* GET_TARGET_DESCRIPTION_CALLBACK) (const std::string &amp;name, USIZE size, VOID *buf, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function that Pin calls to get the content of a document that describes an emulated target processor to an application-level debugger. This is useful, for example, when a Pin tool emulates additional registers beyond those defined by the native CPU. A debugger can use this document to understand the emulated registers and how to display them.</p>
<p>The format of the returned document varies depending on the debugger that is connected to Pin. Tools can use <a class="el" href="group__APPDEBUG.html#gadbe2a0980528561c214a4b8bfdca1251">PIN_GetDebuggerType()</a> to tell which debugger is connected.</p>
<p>When used with GDB, the description should be an XML "target feature" document, as described in the GDB user manual, "Debugging With GDB". See the appendix titled "Target Descriptions" for details of the XML document format. GDB starts by asking for a document titled "target.xml". However, this document may reference other documents via "include" statements. If so, GDB will ask for those additional documents by their names.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The name of the requested document. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size (bytes) of the <em>buf</em> buffer. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Points to a buffer that receives the content of the document. If the document requires more than <em>size</em> bytes, the tool need not write anything into <em>buf</em>. Instead, the tool should return the required size. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If the tool knows how to provide the document named <em>name</em>, it returns the size (bytes) of that document. If that size is less than or equal to <em>size</em>, the tool should also write the content of the document to <em>buf</em>. If the tool does not know how to provide this document, it should return zero. </dd></dl>

</div>
</div>
<a id="ga3e5a10fa61485e7bce314a1c3fe51216"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e5a10fa61485e7bce314a1c3fe51216">&#9670;&nbsp;</a></span>INTERCEPT_DEBUGGING_EVENT_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef BOOL(* INTERCEPT_DEBUGGING_EVENT_CALLBACK) (<a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="group__APPDEBUG.html#gad6ae164e2005bda040921f234730cb5a">DEBUGGING_EVENT</a> eventType, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, VOID *arg)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function when the tool intercepts a debugging event with <a class="el" href="group__APPDEBUG.html#ga4f727b422499f5d312204ba42b23fda0">PIN_InterceptDebuggingEvent()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>The Pin thread ID of the thread that received the debugging event. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">eventType</td><td>Tells the debugging event. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ctxt</td><td>On input, gives the register state at the point the thread received the event. The tool may change <em>ctxt</em>. If the event is passed on to the debugger, the debugger sees the modified register state. If the event is not passed on to the debugger, the thread resumes execution at the new register state. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>The tool's call-back value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returning TRUE tells Pin to pass the debugging event on to the debugger. Returning FALSE tells Pin to squash the event and the thread resumes without stopping in the debugger.</dd></dl>
<p>The following scenarios are not allowed:</p>
<ul>
<li>The call-back may not return FALSE for DEBUGGING_EVENT_ASYNC_BREAK.</li>
<li>If the call-back returns TRUE for DEBUGGING_EVENT_BREAKPOINT or DEBUGGING_EVENT_SINGLE_STEP, it may not change the value of REG_INST_PC in <em>ctxt</em>. This restriction exists because debuggers typically make assumptions on the PC value when these events trigger. </li>
</ul>

</div>
</div>
<a id="gacb569f5ec458c0cdacfbc511e8d7a24b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacb569f5ec458c0cdacfbc511e8d7a24b">&#9670;&nbsp;</a></span>SET_EMULATED_REGISTER_CALLBACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VOID(* SET_EMULATED_REGISTER_CALLBACK) (unsigned toolRegId, <a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a> tid, <a class="el" href="structCONTEXT.html">CONTEXT</a> *ctxt, const VOID *data, VOID *v)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call-back function that Pin calls to set the value of a register emulated by the tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">toolRegId</td><td>Identifies the emulated register (from the <em>registerDescriptions</em> parameter to <a class="el" href="group__APPDEBUG.html#ga227aa5052c499e58c77a376048478647">PIN_AddDebuggerRegisterEmulator()</a>). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>Identifies the thread whose register is written. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>Architected register state for the thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Points to the new value for the register. The value is stored in the same format as described in GET_EMULATED_REGISTER_CALLBACK. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>The tool's call-back value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga25f41d731fbc522fea67abd02f9c04c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga25f41d731fbc522fea67abd02f9c04c6">&#9670;&nbsp;</a></span>DEBUG_CONNECTION_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__APPDEBUG.html#ga25f41d731fbc522fea67abd02f9c04c6">DEBUG_CONNECTION_TYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Possible connection types for an application debugger. The connection type can be specified either via the -appdebug knobs or by <a class="el" href="group__APPDEBUG.html#ga15e52a111880529d439946eb392dd992">PIN_SetDebugMode()</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga25f41d731fbc522fea67abd02f9c04c6a48023b1450d43ba2c4190432e50fcb44"></a>DEBUG_CONNECTION_TYPE_NONE&#160;</td><td class="fielddoc"><p>Application debugging is disabled in this session. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga25f41d731fbc522fea67abd02f9c04c6abc9902ef5ebfac00333f6ce7bd00cd57"></a>DEBUG_CONNECTION_TYPE_TCP_SERVER&#160;</td><td class="fielddoc"><p>Pin opens a TCP port and waits for a debugger to connect. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga25f41d731fbc522fea67abd02f9c04c6a656476b26189f8de3f70603ce19a3640"></a>DEBUG_CONNECTION_TYPE_TCP_CLIENT&#160;</td><td class="fielddoc"><p>Pin connects to a TCP port opened by the debugger. </p>
</td></tr>
</table>

</div>
</div>
<a id="gaf8cf023622aae11218cc9c911b906deb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf8cf023622aae11218cc9c911b906deb">&#9670;&nbsp;</a></span>DEBUG_MODE_OPTION</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__APPDEBUG.html#gaf8cf023622aae11218cc9c911b906deb">DEBUG_MODE_OPTION</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Options which affect application debugging. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaf8cf023622aae11218cc9c911b906deba83aab8069eb6913be66d65a272343f4f"></a>DEBUG_MODE_OPTION_NONE&#160;</td><td class="fielddoc"><p>No options specified. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaf8cf023622aae11218cc9c911b906debad239403d750fcc2bd58f07d609c9962a"></a>DEBUG_MODE_OPTION_STOP_AT_ENTRY&#160;</td><td class="fielddoc"><p>If this option is set, Pin stops the application at the first instruction and execution remains stopped until a debugger connects and continues the application. If this option is cleared, the application immediately runs when <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a> is called. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaf8cf023622aae11218cc9c911b906deba723c132474f30b96833655fba66a3cf5"></a>DEBUG_MODE_OPTION_SILENT&#160;</td><td class="fielddoc"><p>If debugging is enabled Pin normally prints a message to the console when <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a> is called which tells the user how to connect a debugger. This option suppresses the message. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaf8cf023622aae11218cc9c911b906deba4e65fd1fd0aadcefd334b4824965eaf7"></a>DEBUG_MODE_OPTION_ALLOW_REMOTE&#160;</td><td class="fielddoc"><p>By default, Pin only listens for a debugger's TCP connection on the local machine. If this option is enabled, Pin will also listen for a connection from a remote machine. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga41e814fff526e0232f2f8c3055d6e88b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga41e814fff526e0232f2f8c3055d6e88b">&#9670;&nbsp;</a></span>DEBUG_STATUS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__APPDEBUG.html#ga41e814fff526e0232f2f8c3055d6e88b">DEBUG_STATUS</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Possible status codes telling the state of application level debugging. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga41e814fff526e0232f2f8c3055d6e88ba72ca0db67ae970e3c62a40b5ac4f7003"></a>DEBUG_STATUS_DISABLED&#160;</td><td class="fielddoc"><p>Application debugging is not enabled in this Pin session. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga41e814fff526e0232f2f8c3055d6e88ba8360ff1aaecfe81589ca624db3618367"></a>DEBUG_STATUS_UNCONNECTABLE&#160;</td><td class="fielddoc"><p>Application debugging is enabled, but it is too early to allow a debugger to connect. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga41e814fff526e0232f2f8c3055d6e88ba994b4c3ad3ae17936ecf71deaadf1f80"></a>DEBUG_STATUS_UNCONNECTED&#160;</td><td class="fielddoc"><p>Application debugging is enabled, but no debugger is connected yet. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga41e814fff526e0232f2f8c3055d6e88bac55ed4b18e05f4dcd13a38bbe6ee6cb7"></a>DEBUG_STATUS_CONNECTED&#160;</td><td class="fielddoc"><p>Application debugging is enabled and a debugger is connected. </p>
</td></tr>
</table>

</div>
</div>
<a id="ga87ad53f06ecf9cbcd3b94a155e1c11b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga87ad53f06ecf9cbcd3b94a155e1c11b5">&#9670;&nbsp;</a></span>DEBUGGER_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__APPDEBUG.html#ga87ad53f06ecf9cbcd3b94a155e1c11b5">DEBUGGER_TYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Application debugger types that could be connected to Pin. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga87ad53f06ecf9cbcd3b94a155e1c11b5a36c70d872b32db70ffa16fb1f9a1e698"></a>DEBUGGER_TYPE_UNKNOWN&#160;</td><td class="fielddoc"><p>No debugger connected, or type is unknown. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga87ad53f06ecf9cbcd3b94a155e1c11b5a93747991bbf93bec18a63aa0def7502a"></a>DEBUGGER_TYPE_GDB&#160;</td><td class="fielddoc"><p>The GNU debugger. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga87ad53f06ecf9cbcd3b94a155e1c11b5ae257dd6ee7c4c21be32afc5dfa4145ee"></a>DEBUGGER_TYPE_LLDB&#160;</td><td class="fielddoc"><p>The LLVM debugger. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga87ad53f06ecf9cbcd3b94a155e1c11b5a215d036d52fcd8a1d9d0655c0915983f"></a>DEBUGGER_TYPE_IDB&#160;</td><td class="fielddoc"><p>The Intel debugger. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga87ad53f06ecf9cbcd3b94a155e1c11b5a382d02f0500b212562d3278dee138b3c"></a>DEBUGGER_TYPE_VISUAL_STUDIO_VSDBG&#160;</td><td class="fielddoc"><p>Visual Studio via VSDBG. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga87ad53f06ecf9cbcd3b94a155e1c11b5aa51709dd57db7e6200b154e9b1cb71d7"></a>DEBUGGER_TYPE_VISUAL_STUDIO&#160;</td><td class="fielddoc"><p>Visual Studio via native connection. </p>
</td></tr>
</table>

</div>
</div>
<a id="gad6ae164e2005bda040921f234730cb5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad6ae164e2005bda040921f234730cb5a">&#9670;&nbsp;</a></span>DEBUGGING_EVENT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__APPDEBUG.html#gad6ae164e2005bda040921f234730cb5a">DEBUGGING_EVENT</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Possible debugging events that can be intercepted with <a class="el" href="group__APPDEBUG.html#ga4f727b422499f5d312204ba42b23fda0">PIN_InterceptDebuggingEvent()</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggad6ae164e2005bda040921f234730cb5aad5cc78dfe7674fb92a5fb4a7648d00d9"></a>DEBUGGING_EVENT_BREAKPOINT&#160;</td><td class="fielddoc"><p>Thread triggered a breakpoint. This does not include breakpoints trigged via <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a>. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad6ae164e2005bda040921f234730cb5aa2b7b5b57923d2c0fd4dfee4a4a2e4b73"></a>DEBUGGING_EVENT_SINGLE_STEP&#160;</td><td class="fielddoc"><p>Thread completed a single-step. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad6ae164e2005bda040921f234730cb5aa5d342e07a5c1d8f4707af1c8d1835f5c"></a>DEBUGGING_EVENT_ASYNC_BREAK&#160;</td><td class="fielddoc"><p>Thread stopped due to a request from the debugger or because another thread has stopped in the debugger. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0d438691aafd8e03aadbd6b60049dae9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0d438691aafd8e03aadbd6b60049dae9">&#9670;&nbsp;</a></span>IMG_GetLoaderInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID* IMG_GetLoaderInfo </td>
          <td>(</td>
          <td class="paramtype">IMG&#160;</td>
          <td class="paramname"><em>img</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets a read-only copy of loader information for the image which is used in PIN ADX debugger.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>The image object to act on</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to OS specific structure that holds data about loader information. On Linux, this is a pointer to struct LINUX_LOADER_IMAGE_INFO.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga73ff2524249eac7fa68f269b642a7dac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga73ff2524249eac7fa68f269b642a7dac">&#9670;&nbsp;</a></span>IMG_SetLoaderInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID IMG_SetLoaderInfo </td>
          <td>(</td>
          <td class="paramtype">IMG&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>loaderInfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the loader information for the image which are used in PIN ADX debugger.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>The image object to act on </td></tr>
    <tr><td class="paramname">loaderInfo</td><td>Points to OS specific structure that holds data about loader information. On Linux, this is a pointer to struct LINUX_LOADER_IMAGE_INFO.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga4d6cb680fcf43fe32857fe54bfc8e2a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4d6cb680fcf43fe32857fe54bfc8e2a3">&#9670;&nbsp;</a></span>PIN_AddBreakpointHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddBreakpointHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#gaee4c44a7173aa62cd5121253d2966b52">DEBUG_BREAKPOINT_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a handler that can intercept breakpoint set/delete commands sent from an application debugger. This API allows a tool to take control over specific breakpoints stop behavior.</p>
<p>A tool may install more than one handler function. Pin calls each one until it reaches an handler that understand the command.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The breakpoint handler function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the handler function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows, macOS*<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga227aa5052c499e58c77a376048478647"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga227aa5052c499e58c77a376048478647">&#9670;&nbsp;</a></span>PIN_AddDebuggerRegisterEmulator()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_AddDebuggerRegisterEmulator </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>numRegisters</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structDEBUGGER__REG__DESCRIPTION.html">DEBUGGER_REG_DESCRIPTION</a> *&#160;</td>
          <td class="paramname"><em>registerDescriptions</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#ga9d7745cc697db791f72d06cd149daa72">GET_EMULATED_REGISTER_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>getFun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#gacb569f5ec458c0cdacfbc511e8d7a24b">SET_EMULATED_REGISTER_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>setFun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#gaf5bdf55a090a9e22c7fdc2efbfac8cb6">GET_TARGET_DESCRIPTION_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>getDescriptionFun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API is useful for Pin tools that emulate registers that do not exist in the host machine's ISA. If an application debugger is attached to Pin, this API informs the debugger about the extended registers, allowing users to display and manipulate the emulated registers as though they were native registers. Of course, not all debuggers have this capability. Calling this API for such a non-conforming debugger is legal, but ineffective. A non-conforming debugger will ignore the emulated registers and just display the native ones.</p>
<p>When using this API, the set of registers presented to the debugger is specified in two redundant ways, and it is the tool's responsibility to ensure that they are consistent. One specification is a text document that the debugger reads. This document can have any format that the tool and the debugger agree upon, and could convey information about the registers, how they should be displayed in the debugger, etc. The tool provides this document via the <em>getDescriptionFun</em> call-back. The second register specification is through the <em>registerDescriptions</em> parameter, which Pin uses when communicating the register values to the debugger.</p>
<p>If this API is called, it must be called before calling <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>. Also, a tool can install only one debugger register emulator, so a call to <a class="el" href="group__APPDEBUG.html#ga227aa5052c499e58c77a376048478647">PIN_AddDebuggerRegisterEmulator()</a> will overwrite any previous call.</p>
<p>When used with GDB, this API is effective only for versions of GDB that support register extensions in the XML "feature document". This includes GDB versions 7.2 and later, as well as some distributions of earlier GDB versions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">numRegisters</td><td>The number of entries in <em>registerDescriptions</em>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">registerDescriptions</td><td>An array describing each register that the debugger will know about. This includes both native registers and emulated registers. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">getFun</td><td>Call-back function that Pin calls to get the value of an emulated register. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">setFun</td><td>Call-back function that Pin calls to set the value of an emulated register. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">getDescriptionFun</td><td>Call-back function that Pin calls to get the content of a text document that tells the debugger about the registers defined in <em>registerDescriptions</em>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value passed to the call-back functions.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga8b7429dba7db028dc095a48d026b30f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8b7429dba7db028dc095a48d026b30f3">&#9670;&nbsp;</a></span>PIN_AddDebugInterpreter()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PIN__CALLBACKS.html#ga80ecde10e25aa90133f29e875d21d61d">PIN_CALLBACK</a> PIN_AddDebugInterpreter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#ga3d6a74972d3450e7fb487103f5fe8147">DEBUG_INTERPRETER_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register a handler that can interpret commands sent from an application debugger. This API allows a tool to extend the normal set of commands understood by a debugger that is connected to Pin.</p>
<p>A tool may install more than one interpreter function. Pin calls each one until it reaches an interpreter that understand the command.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The debug interpreter function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the interpreter function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>PIN_CALLBACK A handle to a callback that can be used to further modify this callback's properties</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gabbd52cd5977cd9ffef8065f144137b14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabbd52cd5977cd9ffef8065f144137b14">&#9670;&nbsp;</a></span>PIN_ApplicationBreakpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_ApplicationBreakpoint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structCONTEXT.html">CONTEXT</a> *&#160;</td>
          <td class="paramname"><em>ctxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>tid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>waitIfNoDebugger</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>msg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A tool can call this API to stop execution in an application debugger as though a breakpoint was hit. The <em>ctxt</em> parameter tells the register state that the debugger sees when the application stops. If application level debugging is not enabled in this Pin session, execution does not stop, but resumes immediately at <em>ctxt</em>. Tools can tell if application level debugging is enabled by calling <a class="el" href="group__APPDEBUG.html#ga92c6d18526f1f895eb9d2736c79478e4">PIN_GetDebugStatus()</a>.</p>
<p>The semantics of this API are very similar to <a class="el" href="group__CONTEXT.html#gade2217c59d6e6b5cad08a59afe3d879a">PIN_ExecuteAt()</a>. Both APIs abandon the current analysis function and resume execution at a new <a class="el" href="structCONTEXT.html">CONTEXT</a>. The only difference is that <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a> also stops at a breakpoint in the application debugger.</p>
<p>This API can be called from an analysis function or a replacement routine, but not from a callback.</p>
<p>When this API is called from an analysis function or replacement function, and if they execute the current routine or instruction being analyzed, then execution will resume at the instrumented routine or instruction and the analysis function will be called again. It is the pintool's responsibility to avoid going into an infinite loop of calls to the analysis function.</p>
<p>The expected format of the <em>msg</em> string may depend on which debugger is connected to Pin. Tools can call <a class="el" href="group__APPDEBUG.html#gadbe2a0980528561c214a4b8bfdca1251">PIN_GetDebuggerType()</a> to find the debugger type.</p>
<p>When used with GDB, the <em>msg</em> string is displayed verbatim to the user when the debugger stops. The debugger adds a newline to the end of the string before displaying it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ctxt</td><td>The register state that is reported to the debugger. When the debugger resumes this thread, it resumes execution at this register state (unless the debugger changes the register state). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>The ID of the calling thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">waitIfNoDebugger</td><td>If <em>waitIfNoDebugger</em> is TRUE and the status is DEBUG_STATUS_UNCONNECTED, <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a> blocks until a debugger connects. Tools can call <a class="el" href="group__APPDEBUG.html#ga92c6d18526f1f895eb9d2736c79478e4">PIN_GetDebugStatus()</a> to get the status. If <em>waitIfNoDebugger</em> is FALSE or if the status is DEBUG_STATUS_DISABLED or DEBUG_STATUS_UNCONNECTABLE, <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a> resumes immediately at the new context when no debugger is connected. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>Tells the reason why the breakpoint was triggered.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This API never returns.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The vm lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gab651618eb1f148e0f1d0af927510c3a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab651618eb1f148e0f1d0af927510c3a6">&#9670;&nbsp;</a></span>PIN_ChangePendingToolBreakpointOnStoppedThread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_ChangePendingToolBreakpointOnStoppedThread </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>tid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>squash</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>msg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If the given stopped thread has a pending tool breakpoint, this function can change the message associated with that breakpoint request or it can squash the breakpoint request entirely. The debugger will see the effect of the changed breakpoint after it resumes execution of the thread. If the tool changes the breakpoint message, the debugger will receive the breakpoint event with the new message. If the tool squashes the breakpoint request, the thread will not stop at the breakpoint at all. Instead, it continues executing at the \i ctxt parameter that was passed to <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>Pin ID of a stopped thread. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">squash</td><td>If TRUE, the breakpoint request is squashed. The <em>msg</em> parameter is ignored in this case. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The new breakpoint message for this breakpoint request.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if thread <em>tid</em> is stopped and has a pending breakpoint from <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a>. </dd></dl>

</div>
</div>
<a id="ga36087c681ff5cdf730c3d5d12723ba4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga36087c681ff5cdf730c3d5d12723ba4b">&#9670;&nbsp;</a></span>PIN_GetDebugConnectionInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_GetDebugConnectionInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDEBUG__CONNECTION__INFO.html">DEBUG_CONNECTION_INFO</a> *&#160;</td>
          <td class="paramname"><em>info</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function retrieves the information that an application level debugger will need in order to connect to this Pin session.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">info</td><td>Receives the connection information.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if application level debugging is enabled for this Pin session.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gadbe2a0980528561c214a4b8bfdca1251"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadbe2a0980528561c214a4b8bfdca1251">&#9670;&nbsp;</a></span>PIN_GetDebuggerType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__APPDEBUG.html#ga87ad53f06ecf9cbcd3b94a155e1c11b5">DEBUGGER_TYPE</a> PIN_GetDebuggerType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function tells the type of application level debugger (if any) that is connected to Pin. If no debugger is connected, returns DEBUGGER_TYPE_UNKNOWN.</p>
<dl class="section return"><dt>Returns</dt><dd>The type of the application level debugger that is connected to Pin.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga92c6d18526f1f895eb9d2736c79478e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga92c6d18526f1f895eb9d2736c79478e4">&#9670;&nbsp;</a></span>PIN_GetDebugStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__APPDEBUG.html#ga41e814fff526e0232f2f8c3055d6e88b">DEBUG_STATUS</a> PIN_GetDebugStatus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function tells whether application level debugging is enabled in this Pin session. If so, it tells whether an application debugger is currently connected to Pin.</p>
<dl class="section return"><dt>Returns</dt><dd>A code telling the status of application level debugging.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga9c5930cc3e21cec532e4909ee3f9f165"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c5930cc3e21cec532e4909ee3f9f165">&#9670;&nbsp;</a></span>PIN_GetStoppedThreadPendingToolBreakpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_GetStoppedThreadPendingToolBreakpoint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__THREADS.html#ga645289be59039349ad77ad2fa7b0e2f3">THREADID</a>&#160;</td>
          <td class="paramname"><em>tid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>msg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tells whether a stopped thread has called <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a>, but the breakpoint has NOT yet been reported to the debugger. For example, this can occur if two threads call <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a> simultaneously and the debugger has asked Pin to report one debugger event at a time. In this case, Pin reports one breakpoint to the debugger and leaves the other breakpoint pending.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tid</td><td>Pin ID of a stopped thread. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">msg</td><td>If there is a pending breakpoint and if <em>msg</em> is not NULL, <em>msg</em> receives the breakpoint message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if thread <em>tid</em> is stopped and has a pending breakpoint from <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a>. </dd></dl>

</div>
</div>
<a id="ga4f727b422499f5d312204ba42b23fda0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4f727b422499f5d312204ba42b23fda0">&#9670;&nbsp;</a></span>PIN_InterceptDebuggingEvent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_InterceptDebuggingEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#gad6ae164e2005bda040921f234730cb5a">DEBUGGING_EVENT</a>&#160;</td>
          <td class="paramname"><em>eventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#ga3e5a10fa61485e7bce314a1c3fe51216">INTERCEPT_DEBUGGING_EVENT_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VOID *&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Establish an interceptor function for debugging events that Pin sends to an external debugger. This API allows a tool to filter these events before they are visible to the debugger.</p>
<p>A tool can set only one "intercept" function for a particular event, so a new function overwrites any previous one for the same event. To disable an interceptor, pass a NULL function pointer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">eventType</td><td>Tells the type of events to intercept. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The tool's interceptor function, or NULL. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value to pass to the interceptor function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gaca4da902f7ed6a9985b9ab26a6699384"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaca4da902f7ed6a9985b9ab26a6699384">&#9670;&nbsp;</a></span>PIN_RemoveBreakpointHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_RemoveBreakpointHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#gaee4c44a7173aa62cd5121253d2966b52">DEBUG_BREAKPOINT_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove a previously installed breakpoint handler function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The breakpoint handler to remove.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows, macOS*<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gae16ccb04f07c4d2d7eb021e128b28f2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae16ccb04f07c4d2d7eb021e128b28f2b">&#9670;&nbsp;</a></span>PIN_RemoveDebugInterpreter()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_RemoveDebugInterpreter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__APPDEBUG.html#ga3d6a74972d3450e7fb487103f5fe8147">DEBUG_INTERPRETER_CALLBACK</a>&#160;</td>
          <td class="paramname"><em>fun</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove a previously installed debug interpreter function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The interpreter function to remove.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gaa878efff68323d2a8f23b7ee2b5a912c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa878efff68323d2a8f23b7ee2b5a912c">&#9670;&nbsp;</a></span>PIN_ResetBreakpointAt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PIN_ResetBreakpointAt </td>
          <td>(</td>
          <td class="paramtype">ADDRINT&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Resets the breakpoint address, and returns the control back to PinADX.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>The breakpoint address.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows, macOS*<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="ga15e52a111880529d439946eb392dd992"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga15e52a111880529d439946eb392dd992">&#9670;&nbsp;</a></span>PIN_SetDebugMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_SetDebugMode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structDEBUG__MODE.html">DEBUG_MODE</a> *&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set whether application debugging is enabled or disabled in this Pin session and set the debugging mode if debugging is enabled. This API overrides the following knobs if they are specified on the command line:</p>
<ul>
<li><a class="el" href="group__CL__OPTIONS.html#SWITCH_APPDEBUG">-appdebug</a></li>
<li><a class="el" href="group__CL__OPTIONS.html#SWITCH_APPDEBUG_ENABLE">-appdebug_enable</a></li>
<li><a class="el" href="group__CL__OPTIONS.html#SWITCH_APPDEBUG_SILENT">-appdebug_silent</a></li>
<li><a class="el" href="group__CL__OPTIONS.html#SWITCH_APPDEBUG_ALLOW_REMOTE">-appdebug_allow_remote</a></li>
<li><a class="el" href="group__CL__OPTIONS.html#SWITCH_APPDEBUG_CONNECTION">-appdebug_connection</a></li>
<li><a class="el" href="group__CL__OPTIONS.html#SWITCH_APPDEBUG_EXCLUDE">-appdebug_exclude</a></li>
</ul>
<p>If the tool calls this API, it must be called before <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Tells whether application debugging is enabled and specifies the mode. If mode-&gt;_tcpClient-&gt;_ip is set, this method makes a copy of the string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE on success, FALSE on failure or if called after <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
<a id="gacc153fff2b3f0f8542b5c5208356f0fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacc153fff2b3f0f8542b5c5208356f0fb">&#9670;&nbsp;</a></span>PIN_WaitForDebuggerToConnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL PIN_WaitForDebuggerToConnect </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>timeout</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Waits for an application level debugger to connect to this Pin session. This function may only be called after <a class="el" href="group__PIN__CONTROL.html#gab466cd00518ff315446c92f98f7ea1a0">PIN_StartProgram()</a>. If the debugger status is DEBUG_STATUS_DISABLED or DEBUG_STATUS_UNCONNECTABLE, it returns FALSE immediately.</p>
<p>After a successful return, an application level debugger is connected to Pin. The debugger will stop the application soon, but there is no guarantee that this will happen immediately after this API returns. If the tool wants to guarantee an immediate stop, it should call <a class="el" href="group__APPDEBUG.html#gabbd52cd5977cd9ffef8065f144137b14">PIN_ApplicationBreakpoint()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>A timeout value (milliseconds). This function returns (with FALSE) if a debugger has not connected by the end of the timeout period. A <em>timeout</em> value of zero means wait forever.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if an application level debugger is connected.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br  />
<b>O/S</b>: Linux, Windows<br  />
<b>CPU:</b> IA-32 and Intel(R) 64 architectures<br  />
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
